import React from "react";



export default class Packapply extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            backgroound: "",
            display:"none"
        }

    }

    over() {
        this.setState({
            background: "#f4fafa",
            display:"block"
        });
    }

    out() {
        this.setState({
            background: "",
            display:"none"
        });
    }
    downloadfile(url) {
      window.location.href = url
    }
    render() {
        let con=this.props.item2;
        let url = this.props.contractUrlSum
        return (
            <div style={{height: 30,width: '270px',background: this.state.background, clear:'both'}} onMouseOver={this.over.bind(this)} onMouseOut={this.out.bind(this)}>
                <a className="order_detail_contract_name">{con}</a>
                <a className="order_span_filedown_icon" style={{display:this.state.display}} onClick={this.downloadfile.bind(this, url)}>下载</a>
            </div>
        );
    }
}
